package com.jfinal.complex.tablesplit.service.interfaces;

import java.util.List;

import com.jfinal.complex.tablesplit.model.interfaces.ITableSplitCfg;
import com.jfinal.complex.tablesplit.model.interfaces.ITableSplitMappingCfg;

/**
 * 取分表规则业务类
 * @author yuehh
 *
 */
public interface ITableSplitService {
	/**
	 * 从缓存中取分表配置规则
	 * @param tableName 表名
	 * @return
	 */
	public ITableSplitCfg getTableSplitCfgFromCache(String tableName);
	/**
	 * 从数据库中取分表规则
	 * @param tableName
	 * @return
	 */
	public ITableSplitCfg getTableSplitCfgFromDB(String tableName);
	/**
	 * 从缓存中取分表转换映射配置
	 * @param tableName
	 * @return
	 */
	public List<ITableSplitMappingCfg> getTableSplitMappingCfgFromCache(String tableName);
	/**
	 * 从数据库中取分表转换映射配置
	 * @param tableName
	 * @return
	 */
	public List<ITableSplitMappingCfg> getTableSplitMappingCfgFromDB(String tableName);
}
